<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML>
<html lang="zh">
<head>
<link type="text/css" rel="stylesheet"
	href="http://www.txazo.com/css/${applicationScope.edition}/register.css" />
<title>用户注册</title>
</head>
<body>
	<div id="register">
		<div id="title">
			<span>新用户注册</span>
		</div>
		<div id="re_form">
			<form action="register/register" method="post">
				<div>
					<span class="form_title">注册邮箱：</span> <input id="reg_account"
						type="text" name="account" value="${account}" />
					<c:if test="${!empty index}">
						<span class="form_msg">请输入常用的邮件地址</span>
					</c:if>
					<c:if test="${empty index}">
						<c:if test="${empty tip1}">
							<span class="right_img"></span>
						</c:if>
						<c:if test="${!empty tip1}">
							<span class="form_error"><font>${tip1}</font></span>
						</c:if>
					</c:if>
				</div>
				<div>
					<span class="form_title">密码：</span> <input id="reg_password"
						type="password" name="password" value="${password}" />
					<c:if test="${!empty index}">
						<span class="form_msg">请输入6到18个字符的密码</span>
					</c:if>
					<c:if test="${empty index}">
						<c:if test="${empty tip2}">
							<span class="right_img"></span>
						</c:if>
						<c:if test="${!empty tip2}">
							<span class="form_error"><font>${tip2}</font></span>
						</c:if>
					</c:if>
				</div>
				<div>
					<span class="form_title">确认密码：</span> <input id="reg_repeat"
						type="password" name="repeat" value="${repeat}" />
					<c:if test="${!empty index}">
						<span class="form_msg">请再次输入密码</span>
					</c:if>
					<c:if test="${empty index}">
						<c:if test="${empty tip3}">
							<span class="right_img"></span>
						</c:if>
						<c:if test="${!empty tip3}">
							<span class="form_error"><font>${tip3}</font></span>
						</c:if>
					</c:if>
				</div>
				<div>
					<span class="form_title">昵称：</span> <input id="reg_nickname"
						type="text" name="nickname" value="${nickname}" />
					<c:if test="${!empty index}">
						<span class="form_msg">请输入以字母开头的6到18个字符的昵称</span>
					</c:if>
					<c:if test="${empty index}">
						<c:if test="${empty tip4}">
							<span class="right_img"></span>
						</c:if>
						<c:if test="${!empty tip4}">
							<span class="form_error"><font>${tip4}</font></span>
						</c:if>
					</c:if>
				</div>
				<div>
					<span class="form_title">验证码：</span> <input id="reg_authcode"
						type="text" name="authcode" value="${authcode}"
						style="width: 120px;" /> <img id="imgObj" alt="验证码"
						src="/verifyCode?s=register" /> <a id="changeCode"
						href="javascript:changeImg();">换一张</a>
					<c:if test="${!empty index}">
						<span class="form_msg">请输入验证码</span>
					</c:if>
					<c:if test="${empty index}">
						<c:if test="${empty tip5}">
							<span class="right_img"></span>
						</c:if>
						<c:if test="${!empty tip5}">
							<span class="form_error"><font>${tip5}</font></span>
						</c:if>
					</c:if>
				</div>
				<div>
					<input id="submit" type="submit" class="form_submit"
						style="width: 140px; height: 40px; margin-top: 10px;" value="" />
				</div>
			</form>
		</div>
	</div>
	<script type="text/javascript">
		function changeImg() {
			var imgSrc = $("#imgObj");
			var src = imgSrc.attr("src");
			imgSrc.attr("src", src);
		}
	</script>
</body>
</html>